import { getToken } from "@/utils/auth";

// 服务前缀
const GIS_SERVICE_BASE_URL = process.env["VUE_APP_GIS_SERVICE_BASE_URL"]
// 底图前缀
const GIS_MAP_BASE_URL = process.env["VUE_APP_GIS_MAP_BASE_URL"]
// 资源前缀
const GIS_RESOURCE_BASE_URL = process.env["VUE_APP_GIS_RESOURCE_BASE_URL"]

// 矢量底图后缀
const GIS_MAP_SUFFIX1 = process.env["VUE_APP_GIS_MAP_SUFFIX1"]
// 蓝黑矢量底图后缀
const GIS_MAP_SUFFIX2 = process.env["VUE_APP_GIS_MAP_SUFFIX2"]
// 影像底图后缀
const GIS_MAP_SUFFIX3 = process.env["VUE_APP_GIS_MAP_SUFFIX3"]



export var ARCGIS = {
    
    // ====================================底图====================================
    // 矢量图层
    baseUrl:
        `${GIS_MAP_BASE_URL}${GIS_MAP_SUFFIX1}`,
    // 蓝黑色矢量图层
    darkBaseUrl:
        `${GIS_MAP_BASE_URL}${GIS_MAP_SUFFIX2}` ,
    // 影像底图
    baseImageUrl:
        `${GIS_MAP_BASE_URL}${GIS_MAP_SUFFIX3}`,


    // ====================================服务====================================
    // 管网设施
    gwssUrl:
        `${GIS_SERVICE_BASE_URL}/rest/services/CCSW/GWSS/FeatureServer`,
    // 管网设施0_易淹易涝点
    gwss0Url:
        `${GIS_SERVICE_BASE_URL}/rest/services/CCSW/GWSS/FeatureServer/0`,
    // 管网设施1_物联网监控点
    gwss1Url:
        `${GIS_SERVICE_BASE_URL}/rest/services/CCSW/GWSS/FeatureServer/1`,
    // 管网设施2_排水户
    gwss2Url:
        `${GIS_SERVICE_BASE_URL}/rest/services/CCSW/GWSS/FeatureServer/2`,
    // 管网设施3_排口
    gwss3Url:
        `${GIS_SERVICE_BASE_URL}/rest/services/CCSW/GWSS/FeatureServer/3`,
    // 管网设施4_泵站
    gwss4Url:
        `${GIS_SERVICE_BASE_URL}/rest/services/CCSW/GWSS/FeatureServer/4`,
    // 管网设施5_道路
    gwss5Url:
        `${GIS_SERVICE_BASE_URL}/rest/services/CCSW/GWSS/FeatureServer/5`,
    // 管网设施6_桥梁
    gwss6Url:
        `${GIS_SERVICE_BASE_URL}/rest/services/CCSW/GWSS/FeatureServer/6`,
    // 管网设施7_小区
    gwss7Url:
        `${GIS_SERVICE_BASE_URL}/rest/services/CCSW/GWSS/FeatureServer/7`,


    // 崇川管网
    ccgwUrl:
        `${GIS_SERVICE_BASE_URL}/rest/services/CCSW/CCGWFeatureService/MapServer`,
    // 崇川管网0_雨水点
    ccgw0Url:
        `${GIS_SERVICE_BASE_URL}/rest/services/CCSW/CCGWFeatureService/MapServer/0`,
    // 崇川管网1_污水点
    ccgw1Url:
        `${GIS_SERVICE_BASE_URL}/rest/services/CCSW/CCGWFeatureService/MapServer/1`,
    // 崇川管网2_雨污合流点
    ccgw2Url:
        `${GIS_SERVICE_BASE_URL}/rest/services/CCSW/CCGWFeatureService/MapServer/2`,
    // 崇川管网3_截污点
    ccgw3Url:
        `${GIS_SERVICE_BASE_URL}/rest/services/CCSW/CCGWFeatureService/MapServer/3`,
    // 崇川管网4_雨水线
    ccgw4Url:
        `${GIS_SERVICE_BASE_URL}/rest/services/CCSW/CCGWFeatureService/MapServer/4`,
    // 崇川管网5_污水线
    ccgw5Url:
        `${GIS_SERVICE_BASE_URL}/rest/services/CCSW/CCGWFeatureService/MapServer/5`,
    // 崇川管网6_雨污合流线
    ccgw6Url:
        `${GIS_SERVICE_BASE_URL}/rest/services/CCSW/CCGWFeatureService/MapServer/6`,
    // 崇川管网7_截污线
    ccgw7Url:
        `${GIS_SERVICE_BASE_URL}/rest/services/CCSW/CCGWFeatureService/MapServer/7`,

    //  崇川管网动态图层 ===================
    ccgwDynamicUrl:
        `${GIS_SERVICE_BASE_URL}/rest/services/CCSW/CCGWDynamicService/MapServer`,

    // 查询服务
    queryUrl:
        `${GIS_SERVICE_BASE_URL}/rest/services/CCSW/CCSWQueryService/MapServer`,

    // 测量服务
    geometryUrl:
        `${GIS_SERVICE_BASE_URL}/rest/services/Utilities/Geometry/GeometryServer`,

    // 水位服务
    waterUrl:
        `${GIS_SERVICE_BASE_URL}/rest/services/CCSW/SWLabel/MapServer`,

    // 动态更新 + 管网疏通 范围
    areaMapUrl:
        `${GIS_SERVICE_BASE_URL}/rest/services/CCSW/AreaMapService/FeatureServer`,

    // 动态更新
    areaMap0Url:
        `${GIS_SERVICE_BASE_URL}/rest/services/CCSW/AreaMapService/FeatureServer/0`,

    // 管网疏通范围
    areaMap1Url:
        `${GIS_SERVICE_BASE_URL}/rest/services/CCSW/AreaMapService/FeatureServer/1`,


    // // ====================================底图====================================
    // // 矢量图层
    // baseUrl:
    //     "http://127.0.0.1:9527/arcgis/dt?ccps-t=" +getToken(),
    // // 蓝黑色矢量图层
    // darkBaseUrl:
    //     "http://127.0.0.1:9527/arcgis/lhdt?ccps-t=" +getToken(),
    //
    // // 影像底图
    // baseImageUrl:
    //     "http://127.0.0.1:9527/arcgis/imgDt?ccps-t=" +getToken(),
    //
    //
    // // ====================================服务====================================
    // // 管网设施
    // gwssUrl:
    //     "http://127.0.0.1:9527/arcgis/gwss?ccps-t=" +getToken(),
    // // 管网设施0_易淹易涝点
    // gwss0Url:
    //     "http://127.0.0.1:9527/arcgis/yyyld?ccps-t=" +getToken(),
    // // 管网设施1_物联网监控点
    // gwss1Url:
    //     "http://127.0.0.1:9527/arcgis/wlw?ccps-t=" +getToken(),
    // // 管网设施2_排水户
    // gwss2Url:
    //     "http://127.0.0.1:9527/arcgis/psh?ccps-t=" +getToken(),
    // // 管网设施3_排口
    // gwss3Url:
    //     "http://127.0.0.1:9527/arcgis/pk?ccps-t=" +getToken(),
    // // 管网设施4_泵站
    // gwss4Url:
    //     "http://127.0.0.1:9527/arcgis/bz?ccps-t=" +getToken(),
    // // 管网设施5_道路
    // gwss5Url:
    //     "http://127.0.0.1:9527/arcgis/dl?ccps-t=" +getToken(),
    // // 管网设施6_桥梁
    // gwss6Url:
    //     "http://127.0.0.1:9527/arcgis/ql?ccps-t=" +getToken(),
    // // 管网设施7_小区
    // gwss7Url:
    //     "http://127.0.0.1:9527/arcgis/xq?ccps-t=" +getToken(),
    //
    //
    // // 崇川管网
    // ccgwUrl:
    //     "http://127.0.0.1:9527/arcgis/ccgw?ccps-t=" +getToken(),
    // // 崇川管网0_雨水点
    // ccgw0Url:
    //     "http://127.0.0.1:9527/arcgis/ysd?ccps-t=" +getToken(),
    // // 崇川管网1_污水点
    // ccgw1Url:
    //     "http://127.0.0.1:9527/arcgis/wsd?ccps-t=" +getToken(),
    // // 崇川管网2_雨污合流点
    // ccgw2Url:
    //     "http://127.0.0.1:9527/arcgis/wyhld?ccps-t=" +getToken(),
    // // 崇川管网3_截污点
    // ccgw3Url:
    //     "http://127.0.0.1:9527/arcgis/jwd?ccps-t=" +getToken(),
    // // 崇川管网4_雨水线
    // ccgw4Url:
    //     "http://127.0.0.1:9527/arcgis/ysx?ccps-t=" +getToken(),
    // // 崇川管网5_污水线
    // ccgw5Url:
    //     "http://127.0.0.1:9527/arcgis/wsx?ccps-t=" +getToken(),
    // // 崇川管网6_雨污合流线
    // ccgw6Url:
    //     "http://127.0.0.1:9527/arcgis/ywhlx?ccps-t=" +getToken(),
    // // 崇川管网7_截污线
    // ccgw7Url:
    //     "http://127.0.0.1:9527/arcgis/jwx?ccps-t=" +getToken(),
    //
    // //  崇川管网动态图层 ===================
    // ccgwDynamicUrl:
    //     "http://127.0.0.1:9527/arcgis/gwDynamic?ccps-t=" +getToken(),
    //
    // // 查询服务
    // queryUrl:
    //     "http://127.0.0.1:9527/arcgis/query?ccps-t=" +getToken(),
    //
    // // 测量服务
    // geometryUrl:
    //     "http://127.0.0.1:9527/arcgis/measure?ccps-t=" +getToken(),
    //
    // // 水位服务
    // waterUrl:
    //     "http://127.0.0.1:9527/arcgis/sw?ccps-t=" +getToken(),
    //
    // // 动态更新 + 管网疏通 范围
    // areaMapUrl:
    //     "http://127.0.0.1:9527/arcgis/dtgxstfw?ccps-t=" +getToken(),
    //
    // // 动态更新
    // areaMap0Url:
    //     "http://127.0.0.1:9527/arcgis/dtgx?ccps-t=" +getToken(),
    //
    // // 管网疏通范围
    // areaMap1Url:
    //     "http://127.0.0.1:9527/arcgis/stfw?ccps-t=" +getToken(),

    // 水位60秒刷新一次
    waterTime: 60000,

    xmin: 120.67227805299725,
    ymin: 31.87910721508424,
    xmax: 121.03950779429455,
    ymax: 32.16994003378443,

    xCenter: 120.875,
    yCenter: 31.996,

    wkid: 4490
}
